package site.marqstree.kotlin.usercenter.app

import com.joanzapata.iconify.fonts.FontAwesomeModule
import site.marqstree.kotlin.library.base.common.BaseApplication
import site.marqstree.kotlin.library.base.config.AppConfig
import site.marqstree.kotlin.library.base.data.net.interceptor.DebugInterceptor
import site.marqstree.kotlin.library.base.data.net.interceptor.HttpLogInterceptor
import site.marqstree.kotlin.library.base.widget.loader.LoaderStyle


/*
 * 项目名: KotlinMall
 * 包名: site.marqstree.kotlin.usercenter.app
 * 文件名: DebugApp
 * 创建者: marqstree
 * 创建时间: 2020/3/5 9:48
 * 描述: TODO
 */
class DebugApp: BaseApplication() {
    override fun onCreate() {
        super.onCreate()

        //初始化App配置
        AppConfig.init(this)    //记录App上下文
            .withIcon(FontAwesomeModule())      //记录FontAwesome字体
            .withLoaderStyle(LoaderStyle.PacmanIndicator)   //初始化加载进度对话框默认图标
            .withLoaderDelayed(500)               //记录进度对话框延迟关闭时间，单位:ms
            .withWebHost("http://192.168.0.102:3000")       //记录retrofit请求服务器域名
            .withHttpTimeOut(3000)
            .withInterceptor(HttpLogInterceptor())   //添加http日志拦截器
            .configure();   //加载配置项
    }
}